package com.home.qh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.RegionDao;
import com.home.qh.model.Region;
import com.home.qh.service.RegionManager;

/**
 * Implementation of RoleManager interface.
 *
 * @author <a href="mailto:dan@getrolling.com">Dan Kibler</a>
 */
@Service("regionManager")
public class RegionManagerImpl extends GenericManagerImpl<Region, Long> implements RegionManager {
	RegionDao regionDao;

    @Autowired
    public RegionManagerImpl(RegionDao regionDao) {
        super(regionDao);
        this.regionDao = regionDao;
    }

	public List<Region> getRegionByCodeAndName(String regionCode,
			String regionName) {
		return regionDao.getRegionByCodeAndName(regionCode, regionName);
	}

	public List<Region> getRegionByRegion(Region region, String sort, boolean desc, int startResult, int maxResults) {
		return regionDao.getRegionByRegion(region, sort, desc, startResult, maxResults);
	}

}